import request from '@/utils/request'

// 查询消耗品信息列表
export function listConsumable(query) {
  return request({
    url: '/trace/consumable/list',
    method: 'get',
    params: query
  })
}

// 查询消耗品信息列表不分页
export function queryConsumable(query) {
  return request({
    url: '/trace/consumable/query',
    method: 'get',
    params: query
  })
}

// 查询消耗品信息详细
export function getConsumable(consumableId) {
  return request({
    url: '/trace/consumable/' + consumableId,
    method: 'get'
  })
}

// 新增消耗品信息
export function addConsumable(data) {
  return request({
    url: '/trace/consumable',
    method: 'post',
    data: data
  })
}

// 修改消耗品信息
export function updateConsumable(data) {
  return request({
    url: '/trace/consumable',
    method: 'put',
    data: data
  })
}

// 删除消耗品信息
export function delConsumable(consumableId) {
  return request({
    url: '/trace/consumable/' + consumableId,
    method: 'delete'
  })
}

// 导出消耗品信息
export function exportConsumable(query) {
  return request({
    url: '/trace/consumable/export',
    method: 'get',
    params: query
  })
}